<?
	$id = intval($_REQUEST['id']);

	if (fill($_REQUEST['title'])) {
		$SMARTY->assign("vote", $_REQUEST);

	} else if ($id) {
		$vote = getOneRow($TABLE_PREFIX, "id=$id");
  		$SMARTY->assign("vote", $vote);
	}

	$SMARTY->assign("table_prefix", $TABLE_PREFIX);

?>
